package com.fire.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fire.model.enums.DisposeEnum;
import com.fire.model.enums.MonitorEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 监测表
 * </p>
 *
 * @author author
 * @since 2024-04-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("f_monitor")
@ApiModel(value="Monitor对象", description="监测表")
public class Monitor implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "机器id")
    private String machineId;

    @ApiModelProperty(value = "机器所属位置")
    private String location;

    @ApiModelProperty(value = "温度")
    private Integer temp;

    @ApiModelProperty(value = "烟雾浓度")
    private Integer fume;

    @ApiModelProperty(value = "1：良好；2：警告")
    private MonitorEnum status;

    @ApiModelProperty(value = "0：未处理；1：已处理")
    private DisposeEnum isDispose;

    @ApiModelProperty(value = "数据上传时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
}
